/**
  ******************************************************************************
  * @file           : main.c
  * @brief          : Main program body
  ******************************************************************************
  * @attention
  *
  ******************************************************************************
  */

/* Includes ------------------------------------------------------------------*/
#include "tskcfg.h"
#include "bsp.h"
#include "storage.h"

/**
  * @brief  The application entry point.
  * @retval int
  */
	
const Sys_VersionType Sys_Version = 
{
#ifdef EDCT_JUST_PRESS
  .ver = "V5.1.11_PRES",
#else
	.ver = "V5.1.11",
#endif
  
	.bdata = __DATE__" "__TIME__,
};

void dog(void)
{
  LL_IWDG_Enable(IWDG);
  LL_IWDG_EnableWriteAccess(IWDG);
  LL_IWDG_SetPrescaler(IWDG, LL_IWDG_PRESCALER_256);
  LL_IWDG_SetReloadCounter(IWDG, 4095);
  
  while (LL_IWDG_IsReady(IWDG) != 1)
  {
  }

  LL_IWDG_ReloadCounter(IWDG);
}

int main(void)
{
	SysHal_Init();
	
  dog();
	
  _printf("WWKL-EDCT-V5D1\r\n");
	_printf("App version: %s\r\n", Sys_Version.ver);
	_printf("Build Data : %s\r\n", Sys_Version.bdata);
  
  APP_CreateTask();
	
  /* Start scheduler */
  vTaskStartScheduler();

  /* Infinite loop We should never get here as control is now taken by the scheduler */
  while (1)
  {
  }
}



#ifdef  USE_FULL_ASSERT
/**
  * @brief  Reports the name of the source file and the source line number
  *         where the assert_param error has occurred.
  * @param  file: pointer to the source file name
  * @param  line: assert_param error line source number
  * @retval None
  */
void assert_failed(uint8_t *file, uint32_t line)
{
  /* User can add his own implementation to report the file name and line number,
     ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */
}
#endif /* USE_FULL_ASSERT */

/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
